<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>ReflectionEnumUnitCase 类</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="reflectionenum.isbacked.html">« ReflectionEnum::isBacked</a></li>
      <li style="float: right;"><a href="reflectionenumunitcase.construct.html">ReflectionEnumUnitCase::__construct »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="book.reflection.html">反射</a></li>
    <li>ReflectionEnumUnitCase 类</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="class.reflectionenumunitcase" class="reference">
 <h1 class="title">ReflectionEnumUnitCase 类</h1>
 

 <div class="partintro"><p class="verinfo">(PHP 8 &gt;= 8.1.0)</p>


  <div class="section" id="reflectionenumunitcase.intro">
   <h2 class="title">简介</h2>
   <p class="para">
    <span class="classname"><strong class="classname">ReflectionEnumUnitCase</strong></span> 类报告了 Enum 单元条目，
    不包含对应的标量。
   </p>
  </div>


  <div class="section" id="reflectionenumunitcase.synopsis">
   <h2 class="title">类摘要</h2>


   <div class="classsynopsis">
    <div class="ooclass">
     
    </div>

    <div class="classsynopsisinfo">
     <span class="ooclass">
      <span class="modifier">class</span> <strong class="classname">ReflectionEnumUnitCase</strong>
     </span>

     <span class="ooclass">
      <span class="modifier">extends</span>
       <a href="class.reflectionclassconstant.html" class="classname">ReflectionClassConstant</a>
     </span>
     {</div>

    <div class="classsynopsisinfo classsynopsisinfo_comment">/* 继承的常量 */</div>
    <div class="fieldsynopsis">
     <span class="modifier">public</span>
     <span class="modifier">const</span>
     <span class="type">int</span>
      <var class="fieldsynopsis_varname"><a href="class.reflectionclassconstant.html#reflectionclassconstant.constants.is-public"><var class="varname">ReflectionClassConstant::IS_PUBLIC</var></a></var>;</div>
<div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="modifier">const</span>
     <span class="type">int</span>
      <var class="fieldsynopsis_varname"><a href="class.reflectionclassconstant.html#reflectionclassconstant.constants.is-protected"><var class="varname">ReflectionClassConstant::IS_PROTECTED</var></a></var>;</div>
<div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="modifier">const</span>
     <span class="type">int</span>
      <var class="fieldsynopsis_varname"><a href="class.reflectionclassconstant.html#reflectionclassconstant.constants.is-private"><var class="varname">ReflectionClassConstant::IS_PRIVATE</var></a></var>;</div>
<div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="modifier">const</span>
     <span class="type">int</span>
      <var class="fieldsynopsis_varname"><a href="class.reflectionclassconstant.html#reflectionclassconstant.constants.is-final"><var class="varname">ReflectionClassConstant::IS_FINAL</var></a></var>;</div>


    <div class="classsynopsisinfo classsynopsisinfo_comment">/* 继承的属性 */</div>
    <div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="type">string</span>
      <var class="varname"><a href="class.reflectionclassconstant.html#reflectionclassconstant.props.name">$<var class="varname">name</var></a></var>;</div>
<div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="type">string</span>
      <var class="varname"><a href="class.reflectionclassconstant.html#reflectionclassconstant.props.class">$<var class="varname">class</var></a></var>;</div>


    <div class="classsynopsisinfo classsynopsisinfo_comment">/* 方法 */</div>
    <div class="constructorsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><a href="reflectionenumunitcase.construct.html" class="methodname">__construct</a></span>(<span class="methodparam"><span class="type"><span class="type">object</span>|<span class="type">string</span></span> <code class="parameter">$class</code></span>, <span class="methodparam"><span class="type">string</span> <code class="parameter">$constant</code></span>)</div>

    <div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="reflectionenumunitcase.getenum.html" class="methodname">getEnum</a></span>(): <span class="type"><a href="class.reflectionenum.html" class="type ReflectionEnum">ReflectionEnum</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="reflectionenumunitcase.getvalue.html" class="methodname">getValue</a></span>(): <span class="type"><a href="class.unitenum.html" class="type UnitEnum">UnitEnum</a></span></div>


    <div class="classsynopsisinfo classsynopsisinfo_comment">/* 继承的方法 */</div>
    <div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="modifier">static</span> <span class="methodname"><a href="reflectionclassconstant.export.html" class="methodname">ReflectionClassConstant::export</a></span>(<span class="methodparam"><span class="type"><a href="language.types.declarations.html#language.types.declarations.mixed" class="type mixed">mixed</a></span> <code class="parameter">$class</code></span>, <span class="methodparam"><span class="type">string</span> <code class="parameter">$name</code></span>, <span class="methodparam"><span class="type">bool</span> <code class="parameter">$return</code><span class="initializer"> = ?</span></span>): <span class="type">string</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="reflectionclassconstant.getattributes.html" class="methodname">ReflectionClassConstant::getAttributes</a></span>(<span class="methodparam"><span class="type">?</span><span class="type"><span class="type">string</span><span class="type"></span></span> <code class="parameter">$name</code><span class="initializer"> = <strong><code>null</code></strong></span></span>, <span class="methodparam"><span class="type">int</span> <code class="parameter">$flags</code><span class="initializer"> = 0</span></span>): <span class="type">array</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="reflectionclassconstant.getdeclaringclass.html" class="methodname">ReflectionClassConstant::getDeclaringClass</a></span>(): <span class="type"><a href="class.reflectionclass.html" class="type ReflectionClass">ReflectionClass</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="reflectionclassconstant.getdoccomment.html" class="methodname">ReflectionClassConstant::getDocComment</a></span>(): <span class="type"><span class="type">string</span>|<span class="type"><span class="type false">false</span></span></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="reflectionclassconstant.getmodifiers.html" class="methodname">ReflectionClassConstant::getModifiers</a></span>(): <span class="type">int</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="reflectionclassconstant.getname.html" class="methodname">ReflectionClassConstant::getName</a></span>(): <span class="type">string</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="reflectionclassconstant.getvalue.html" class="methodname">ReflectionClassConstant::getValue</a></span>(): <span class="type"><a href="language.types.declarations.html#language.types.declarations.mixed" class="type mixed">mixed</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="reflectionclassconstant.isenumcase.html" class="methodname">ReflectionClassConstant::isEnumCase</a></span>(): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="reflectionclassconstant.isfinal.html" class="methodname">ReflectionClassConstant::isFinal</a></span>(): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="reflectionclassconstant.isprivate.html" class="methodname">ReflectionClassConstant::isPrivate</a></span>(): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="reflectionclassconstant.isprotected.html" class="methodname">ReflectionClassConstant::isProtected</a></span>(): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="reflectionclassconstant.ispublic.html" class="methodname">ReflectionClassConstant::isPublic</a></span>(): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="reflectionclassconstant.tostring.html" class="methodname">ReflectionClassConstant::__toString</a></span>(): <span class="type">string</span></div>

   }</div>


  </div>

  <div class="section" id="reflectionenumunitcase.seealso">
   <h2 class="title">参见</h2>
   <p class="para">
    <ul class="simplelist">
     <li class="member"><a href="language.enumerations.html" class="link">枚举</a></li>
     <li class="member"><span class="classname"><a href="class.reflectionenumbackedcase.html" class="classname">ReflectionEnumBackedCase</a></span></li>
    </ul>
   </p>
  </div>

 </div>

 
















<h2>目录</h2><ul class="chunklist chunklist_reference"><li><a href="reflectionenumunitcase.construct.html">ReflectionEnumUnitCase::__construct</a> — Instantiates a ReflectionEnumUnitCase object</li><li><a href="reflectionenumunitcase.getenum.html">ReflectionEnumUnitCase::getEnum</a> — 获取该枚举条目的反射</li><li><a href="reflectionenumunitcase.getvalue.html">ReflectionEnumUnitCase::getValue</a> — 获取反射对象描述的枚举条目对象</li></ul>
</div>
</div></div></body></html>